package nl.marcoslot.apps.alm;

import java.awt.Container;
import java.awt.EventQueue;
import java.awt.Toolkit;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
import nl.marcoslot.lib.gui.layout.alm.ArithmeticLayoutManager;

/**
 *
 * @author Marco Slot
 */
public class ALMTest1 extends JFrame {
    
    /** Creates new form ALMTest */
    public ALMTest1() {
        init();
    }
    
    public void init() {
        Container panel = getContentPane();
        panel.setLayout(new ArithmeticLayoutManager());
        
        JLabel nameLabel = new JLabel("Name:");
        panel.add(nameLabel,
                "name  = nameLabel;             "+
                "top   = 20;                    "+
                "left  = 20;                    ");
        
        JTextField nameField = new JTextField();
        panel.add(nameField,
                "top   = 20;                    "+
                "left  = nameLabel.rRight + 20; "+
                "right = 20;                    ");
        
        setSize(400, 100);
        setTitle("ALM Sample 1");
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ALMTest1().setVisible(true);
            }
        });
    }
    
}
